![]() |
Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Mixer. Mixes multiple input streams into one output stream. More...
#include <mixer.h>
Public Member Functions | |
Mixer (core::BufferPool< sample_t > &pool, size_t frame_size) | |
Initialize. More... | |
bool | valid () const |
Check if the mixer was succefully constructed. More... | |
void | add (IReader &) |
Add input reader. More... | |
void | remove (IReader &) |
Remove input reader. More... | |
virtual void | read (Frame &frame) |
Read audio frame. More... | |
virtual void | read (Frame &frame)=0 |
Read audio frame. More... | |
![]() | |
ListNodeData * | list_node_data () const |
Get list node data. More... | |
Mixer. Mixes multiple input streams into one output stream.
For example, these two input streams:
are transformed into this output stream:
|
explicit |
Initialize.
Parameters
pool
is used to allocate a temporary buffer of samplesframe_size
defines the temporary buffer size used to read from attached readers void roc::audio::Mixer::add | ( | IReader & | ) |
Add input reader.
|
virtual |
Read audio frame.
frame
with the result. Implements roc::audio::IReader.
void roc::audio::Mixer::remove | ( | IReader & | ) |
Remove input reader.
bool roc::audio::Mixer::valid | ( | ) | const |
Check if the mixer was succefully constructed.